package jym.tan.movielibrary.constant;

import java.util.Date;

import javax.swing.BorderFactory;
import javax.swing.border.BevelBorder;

public class ComponentConstant {
	public static class Text {		
		public static final String FILE_MENU = "File";
		
		public static final String SINGLE_MOVIE_ADD_MENU_ITEM = "Add A Movie";
		public static final String RESTART_MENU_ITEM = "Restart Library";
		
		public static final String SINGLE_MOVIE_ADD_BUTTON = "Add";
		public static final String ADD_SINGLE_FOLDER_BUTTON = "Browse";		
		public static final String MOVIE_TITLE_CONFIRM_BUTTON = "Confirm";
		
		public static final String FOLDER_PATH_LABEL = "Folder Path:";
	}

	public static class Title {
		public static final String LIBRARY_FRAME = "Movie Library";
		
		public static final String ADD_SINGLE_MOVIE_DIALOG = "Add a single Movie";
		public static final String MOVIE_TITLE_CONFIRM_DIALOG = "Confirm Movie Title";
		public static final String ERROR_MESSAGE_DIALOG = "Oops";
		public static final String WARNING_MESSAGE_DIALOG = "Sorry";
	}

	public static class ToolTipText {
		public static final String ADD_SINGLE_FOLDER = "Browse For Folder";
		
		public static final String MOVIE_TITLE_CONFIRM_BUTTON = "Confirm Movie Title";
	}

	public static class Timer {
		public static Integer MOVIE_TITLE_CONFIRM_TIMER = Integer.valueOf(100);
	}

	public static class Cursor {
		public static java.awt.Cursor BUSY = java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR);
		public static java.awt.Cursor DEFAULT = java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR);
	}

	public static class Message {
		public static final String MOVIE_NOT_FOUND = "No such movie found.";
		public static final String ERROR_OCCURED = "Something went wrong!";
	}

	public static class Color {
		public static final java.awt.Color LIGHT_BLUY = new java.awt.Color(41, 117, 200);
		public static final java.awt.Color DARK_BLUE = new java.awt.Color(2, 47, 106);
		public static final java.awt.Color MOVIE_SEARCH_NAME_LABEL = new java.awt.Color(173, 255, 47);
		public static final java.awt.Color MOVIE_SEARCH_YEAR_LABEL = java.awt.Color.WHITE;
	}

	public enum ColumnName {
		NAME("Name", 0, String.class), 
		RELEASED("Released", 1, Date.class), 
		LANGUAGE("Language", 2, String.class), 		 
		RATING("Rating", 3, Double.class), 				
		CERTIFICATION("Certification", 4, String.class),
		IMDB_ID("IMDB ID", 5, String.class);

		private String name;
		private int order;
		private Class<?> clazz;
		
		private ColumnName(String name, int order, Class<?> clazz) {
			this.name = name;
			this.order = order;
			this.clazz = clazz;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public int getOrder() {
			return order;
		}

		public void setOrder(int order) {
			this.order = order;
		}
		
		public Class<?> getClazz() {
			return clazz;
		}
		
		public void setClazz(Class<?> clazz) {
			this.clazz = clazz;
		}
	}

	public static class Column {
		public static final ColumnName[] MOVIE_SEARCH_RESULT_TABLE = { ComponentConstant.ColumnName.NAME, ComponentConstant.ColumnName.RELEASED, ComponentConstant.ColumnName.LANGUAGE, ComponentConstant.ColumnName.RATING, ComponentConstant.ColumnName.CERTIFICATION, ComponentConstant.ColumnName.IMDB_ID };
	}
	
	public static class Border {
		public static javax.swing.border.Border POSTER_LABEL_BORDER = BorderFactory.createLineBorder(java.awt.Color.BLACK, 2);
		public static javax.swing.border.Border BEVEL_LOWERED = BorderFactory.createBevelBorder(BevelBorder.LOWERED);
	}
}
